To display a high color depth image on a low color depth panel (for example, on a panel that is capable of displaying only six bit color), dithering may be used to improve the displayed color quality without visible artifacts. The goal of dithering is to display an average color value for each pixel position. There are two categories of dithering methods, spatial dithering and temporal dithering.
In spatial dithering, an intermediate color of a pixel is achieved with an average color of several adjacent pixels in each area. For example, if the image data is eight bits per color and the panel can display only six bits per color, then the two least significant bits of each color component are dropped.
One implementation of spatial dithering, called random spatial dithering, compares the value of the two dropped bits with two bits of random data. If the dropped two bit value is larger than the random data, then the eight bit input data is rounded up to the most significant six bits. Otherwise, the eight bit input data is truncated to the most significant six bits. By comparing the dropped bits to the random data, the output six bit data can randomly be one of two adjacent integer values. The larger the dropped bits value is, the higher the probability that the output data has a larger integer value.
With random spatial dithering, the random number is added to lower data bits of each pixel and the average color value can be detected by a viewer over a small area with multiple pixels. To avoid visible color patches created when using a fixed random pattern for each frame, the random data pattern is changed from frame to frame. But changing the data pattern may introduce flickering due to a pseudo-random data pattern being applied to each pixel position over time. The flickering may be reduced, but not eliminated, with a horizontal high pass filter on the random noise data.
Table 1 shows an example of different average output values between 61 and 62, with four adjacent pixels and a dithering output of six bits per color. With a six bit output value, fractional values (as shown in the middle column of Table 1) cannot be accurately represented. Within a block of four adjacent pixels, the average value of the pixels within the block can produce the desired equivalent eight bit value. Because the viewer cannot readily perceive individual pixels, the difference between the individual pixels in a given block provides the desired visual effect.
TABLE 1Four adjacent pixelsAverage of fourEquivalentwith six bit dataadjacent pixelseight bit value61 616124461 6161 6161.2524561 6262 6161.5024661 6262 6161.7524762 62
Temporal dithering is performed on a single pixel across a sequence of frames, and uses a predefined round-up/truncate pattern to output low color depth data. An intermediate color value is achieved by changing the output data between two adjacent integer values with a certain pattern in consecutive frames. The round-up/truncate pattern is determined by the value of the dropped bits, the horizontal and vertical locations of the pixel on the screen, and the display frame number.
With temporal dithering, the lower data bits of each pixel are added to a certain noise data pattern depending on the x, y coordinates on the screen. The noise data pattern is repeated every N frames. Within each group of N frames, the noise data covers all values between 0 and N−1 on each pixel position with different sequences. The intermediate average color on each pixel can be detected by the viewer over multiple frames.
For example, if the image data has eight bits per color and the panel can display only six bits per color, the two least significant bits of each color component are dropped. Table 2 shows an example of a six bit dithering output in four consecutive frames for different eight bit data input values. The average output color value is achieved by changing the six bit dithering output values between 61 and 62 in a certain pattern based on the value of the dropped bits.
TABLE 2DroppedFrame 1Frame 2Frame 3Frame 4AverageInput 8bitsoutputoutputoutputoutputoutputEquivalentbit datavaluedatadatadatadatavalueto 8 bit2440616161616124424516162616161.2524525626162616261.5024624736162626261.75247
Depending on the temporal dithering pattern used and the display panel's dot inverse pattern, there may be visible color strip artifacts. It is difficult to find a perfect temporal dithering data pattern to be used with all existing and new display panels, due to differences in individual panels' dot inverse pattern.